Separation Logic with First-Class Heaps and a New Frame Rule

نویسندگان

  • Duc-Hiep Chu
  • Joxan Jaffar
چکیده

Separation Logic brought an advance to program verification of data structures through its use of (recursively defined) predicates to implicitly represent heaps, and the separation operator to construct heaps from disjoint subheaps. While this facilitated local reasoning in program fragments, the consideration of subheaps that are disjoint meant that any form of sharing between predicates is problematic and often requires manual proofs whose complexity may outweigh the core benefits of Separation Logic itself. With this as background motivation, we present an assertion language in which subheaps may be explicitly defined within predicates, and the effect of separation obtained by specifying that certain heaps are disjoint. Predicates can then be conjoined in the traditional way. We then present a new frame rule that is conditioned upon the heap-update operations of a program fragment. Essentially, a predicate can be framed over the program fragment if its footprint is disjoint from the updates. The main contribution is to demonstrate that the induced program verification method now provides local reasoning on problems that so far have not been adequately solved: • structure sharing in data structures, such as in cyclic graphs, where different program fragments act on different parts on these data structures; • summaries of program fragments where there is a recursively defined relationship between the global heap at the entry and exit program points of the fragment; and • incremental updates to complex data structures. Typically different parts of a complex data structure is manipulated by different program fragments (and this depends on the stored values).

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Local Reasoning with First-Class Heaps, and a New Frame Rule

Separation Logic (SL) brought an advance to program verification of data structures by interpreting (recursively defined) predicates as implicit heaps, and using a separating conjoin operator to construct heaps from disjoint subheaps. While the Frame Rule of SL facilitated local reasoning in program fragments, its restriction to disjoint subheaps means that any form of sharing between predicate...

متن کامل

Separation Logic for Higher-Order Store

Separation Logic is a sub-structural logic that supports local reasoning for imperative programs. It is designed to elegantly describe sharing and aliasing properties of heap structures, thus facilitating the verification of programs with pointers. In past work, separation logic has been developed for heaps containing records of basic data types. Languages like C or ML, however, also permit the...

متن کامل

Symbolic Execution with Separation Logic

We describe a sound method for automatically proving Hoare triples for loop-free code in Separation Logic, for certain preconditions and postconditions (symbolic heaps). The method uses a form of symbolic execution, a decidable proof theory for symbolic heaps, and extraction of frame axioms from incomplete proofs. This is a precursor to the use of the logic in automatic specification checking, ...

متن کامل

Semantics of Separation-Logic Typing and Higher-order Frame Rules for Algol-like Languages

We show how to give a coherent semantics to programs that are well-specified in a version of separation logic for a language with higher types: idealized algol extended with heaps (but with immutable stack variables). In particular, we provide simple sound rules for deriving higher-order frame rules, allowing for local reasoning.

متن کامل

Specifying and Verifying Concurrent Algorithms with Histories and Subjectivity

We present a lightweight approach to Hoare-style specifications for fine-grained concurrency, based on a notion of time-stamped histories that abstractly capture atomic changes in the program state. Our key observation is that histories form a partial commutative monoid, a structure fundamental for representation of concurrent resources. This insight provides us with a unifying mechanism that a...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014